﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CapDoi.ascx.vb" Inherits="Control_QuanLyHoSo_CapDoi" %>
<script type='text/javascript'>
    function ajaxJquery() {
        $(function () {

            $(".Date").datepicker({ dateFormat: 'dd/mm/yy' });

            //for enter search
            $(".SubjectTitle input, .SubjectTitle select").keypress(function (e) {
                if (e.keyCode == 13) {
                    $("#<%=btnSearch.ClientID()%>").click();
                    return false;
                }
            });

            //check cookie to show or hide search pannel
            if ($.cookie('CookieSiteSearch') == 1) {
                $('#pnlSearch').show();
            }
            else {
                $('#pnlSearch').hide();
            }
            $('#B1').click(function (event) {
                //set cookie
                if ($.cookie('CookieSiteSearch') == 1) {
                    $.cookie('CookieSiteSearch', 0)
                }
                else {
                    $.cookie('CookieSiteSearch', 1)
                }
                $('#pnlSearch').slideToggle(500);
                if ($('#imgShowHide').attr("src") == "../../images/arrow_popup.gif") {
                    $('#imgShowHide').attr("src", "../../images/arrow_showless.gif");
                }
                else {
                    $('#imgShowHide').attr("src", "../../images/arrow_popup.gif");
                }
            });

        });
    }
    function confirmMultiDelete(strID) {
        var grdShow = document.getElementById("<%=grdShow.ClientID %>");
        var count = 0;
        for (i = 1; i < grdShow.children.item(0).children.length; i++) {
            if (grdShow.children.item(0).children.item(i).children.item(0).children.item(0).checked) {
                count += 1;
            }
        }
        if (count > 0) {
            return ComfirmDialog('<%=drpMessage.Items(1).Text%>', 0, strID, 0, 0);
        } else {
            Alertbox('<%=drpMessage.Items(2).Text%>');
            return false;
        }
    }
    function ComfirmDialog(strText, value, ObjectIdClick, ID, Type) {
        if (value == 0) {
            Confirmbox(strText, value, ObjectIdClick, ID, Type);
            return false;
        } else {
            if (Type == 1) {
                document.getElementById('<%=hidID.ClientID %>').value = ID;
                eval($("#" + ObjectIdClick + "").attr("href"));
            }
            else {
                $("#" + ObjectIdClick + "").click();
            }
        }
    }
</script>
<asp:UpdatePanel ID="uplListTiepNhan" runat="server">
    <ContentTemplate>
        <div class="content_porletform">
            <div class="HeadTitle">
                <h3>
                    QUẢN LÝ CẤP ĐỔI GIẤY CHỨNG NHẬN HỘ KINH DOANH CÁ THỂ</h3>
            </div>
            <div class="box_contentform">
                <div class="box_scroll_grid">
                    <div class="SubjectTitle" id="SInfor" runat="server">
                        <legend class="SubjectTitle">
                            <img alt="" src="../../images/arrow_showless.gif" id="img1" />
                            <a id="B1" href="#">Tìm kiếm</a>&nbsp;&nbsp;</legend>
                    </div>
                    <div class="DivRow" style="display: none">
                        <div class="Div-Left">
                            <div class="DivLabelSearch">
                                Mã số GCN:
                            </div>
                            <div class="DivTextBox">
                                <asp:TextBox ID="txtCertifiedcode" CssClass="TextBox" runat="server" Text="" />
                            </div>
                        </div>
                        <div class="Div-Right">
                            <div class="DivLabelSearch">
                                Ngày chứng nhận:
                            </div>
                            <div class="DivTextBox">
                                <asp:TextBox ID="txtCertifieddateFrom" CssClass="TextBox Date" Width="85px" runat="server"
                                    Text="" />
                                tới ngày:
                                <asp:TextBox ID="txtCertifieddateTo" CssClass="TextBox Date" Width="85px" runat="server"
                                    Text="" />
                            </div>
                        </div>
                    </div>
                    <div id="pnlSearch" class="SubjectTitle">
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Tên hộ (Bảng hiệu):
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtBiz_vietname" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Người đại diện:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_name" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Địa điểm KD:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtBiz_HeadOffice" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Giới tính:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlOw_sex" runat="server" CssClass="DropDownList">
                                        <asp:ListItem Value="-1" Text="--- Tất cả ---" />
                                        <asp:ListItem Value="1" Text="Nam" />
                                        <asp:ListItem Value="0" Text="Nữ" />
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Tạm trú:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_present" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Ngày sinh:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_birthdate" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Phòng ban cấp:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlCertifieddeptname" runat="server" CssClass="DropDownList">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Dân tộc:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlOw_nationality_id" runat="server" CssClass="DropDownList">
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Người ký:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtCertifiedsignername" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    CMND số:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_cardid" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Ngày cấp CMND:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_carddateFrom" CssClass="TextBox Date" Width="85px" runat="server"
                                        Text="" />
                                    tới ngày:
                                    <asp:TextBox ID="txtOw_carddateTo" CssClass="TextBox Date" Width="85px" runat="server"
                                        Text="" />
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Giấy tờ khác:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlOw_docofficertifiedid" runat="server" CssClass="DropDownList">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Nơi cấp:
                                </div>
                                <div class="DivTextBox">
                                    <asp:DropDownList ID="ddlOw_provider_id" runat="server" CssClass="DropDownList">
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                    Mã số thuế:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_taxcode" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Điện thoại:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_tel" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Số fax:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_fax" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="Div-Left">
                                <div class="DivLabelSearch">
                                </div>
                            </div>
                            <div class="Div-Right">
                                <div class="DivLabelSearch">
                                    Email:
                                </div>
                                <div class="DivTextBox">
                                    <asp:TextBox ID="txtOw_email" CssClass="TextBox" runat="server" Text="" />
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                        <div style="clear: both">
                        </div>
                        <div class="DivRow">
                            <div class="DivLabelSearch">
                                &nbsp;&nbsp;&nbsp;</div>
                            <div class="DivTextBox">
                                <asp:Button ID="btnSearch" runat="server" Text=" Tìm kiếm" CssClass="btn" />
                                <asp:Button ID="btnReset" runat="server" Text="Hủy" CssClass="btn" />&nbsp;
                            </div>
                        </div>
                        <div style="clear: both; height: 10px">
                        </div>
                    </div>
                    <div style="clear: both; height: 10px">
                    </div>
                    <asp:GridView ID="grdShow" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                        AllowPaging="false" Width='100%' BorderWidth="1px" CssClass="GridBorder">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:HyperLink ID="hplEdit" runat="server" Text="Xử lý"></asp:HyperLink>
                                    <asp:LinkButton ID="lnkbtnDelete" Text="Xóa" runat="server" OnClick="lnkbtnDelete_Click"
                                        CausesValidation='False' Visible="false"></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridTextLink" HorizontalAlign="Center" Width="7%" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="No">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width="5%" HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:BoundField DataField='Biz_VietName' HeaderText='Tên hộ'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Ow_Name' HeaderText='Người đại diện'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText='Giới tính'>
                                <ItemTemplate>
                                    <asp:Label ID="lblOw_Sex" runat="server"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width='5%' CssClass='text_list_links' HorizontalAlign='Left' />
                            </asp:TemplateField>
                            <asp:BoundField DataField='Ow_BirthDate' HeaderText='Ngày sinh'>
                                <ItemStyle Width='5%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Ow_CardID' HeaderText='CMND'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText='Ngày nộp'>
                                <ItemTemplate>
                                    <asp:Label ID="lblNgayNop" runat="server"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width='8%' CssClass='text_list_links' HorizontalAlign='Left' />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText='Ngày trả'>
                                <ItemTemplate>
                                    <asp:Label ID="lblNgayTra" runat="server"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width='8%' CssClass='text_list_links' HorizontalAlign='Left' />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText='Trang thái'>
                                <ItemTemplate>
                                    <asp:Label ID="lblStatusId" runat="server"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width='5%' CssClass='text_list_links' HorizontalAlign='Left' />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                        <RowStyle CssClass="GridRow" Height="23px" />
                        <AlternatingRowStyle CssClass="GridAlterRow" />
                        <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                        <PagerSettings Mode="Numeric" PageButtonCount="2" />
                        <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                    </asp:GridView>
                    <div style="clear: both; height: 5px">
                    </div>
                    <div>
                        <asp:Button ID="btnDelete" CssClass="btn" runat="server" Text="Xóa" />
                        <asp:Label ID="lblPage_Size" runat="server" Text="Số bản ghi trên trang:"></asp:Label>
                        <asp:DropDownList ID="drpPage_Size" runat="server" AutoPostBack="True" Width="70px"
                            CssClass="input_form">
                            <asp:ListItem Text="10" Value="10"></asp:ListItem>
                            <asp:ListItem Text="20" Value="20"></asp:ListItem>
                            <asp:ListItem Text="50" Value="50"></asp:ListItem>
                            <asp:ListItem Text="100" Value="100"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="lblTotal" runat="server"></asp:Label>
                    </div>
                    <div style="width: 100%">
                        <!--phan trang-->
                        <div id="results_resultsNavigationDiv" class="paginationEMP">
                            <ul>
                                <asp:LinkButton ID="lnkFirst" runat="server"></asp:LinkButton>
                                <asp:Repeater ID="rptPage" runat="server">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkTitle" CssClass="page_num" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <asp:LinkButton ID="lnkLast" runat="server"></asp:LinkButton>
                            </ul>
                        </div>
                        <asp:HiddenField ID="hidCount" Value="0" runat="server" />
                        <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
                        <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
                    </div>
                    <div style='display: none'>
                        <asp:DropDownList ID="drpMessage" runat="server">
                            <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản ghi này không?' Value='0'></asp:ListItem>
                            <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản đã chọn?' Value='1'></asp:ListItem>
                            <asp:ListItem Text='Bạn phải chọn ít nhất một bản ghi.' Value='2'></asp:ListItem>
                        </asp:DropDownList>
                        <asp:HiddenField ID="hidID" Value="0" runat="server" />
                    </div>
                </div>
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
